﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Imagiality.MeshProcessing
{
    public abstract class RootSceneObject : SceneObject
    {
        protected uint ID;
        private Transform transform;

        public void BindID(IDGenerator generator)
        {
            ID = generator.Next(this);

            IList<NodeSceneObject> children = GetChilds();

            foreach (NodeSceneObject child in children)
                child.BindID(generator);
        }

        public Transform Transform
        {
            get 
            {
                return transform;
            }
            set 
            {
                transform = value;
            }
        }

        public uint GetID()
        {
            return ID;
        }

        public abstract IList<NodeSceneObject> GetChilds();
    }
}
